package org.mao.util;

public class ChartMessage {

	private String sender;
	private String message;

	public String getSender() {
		if (sender != null && sender.length() > 10) {
			sender = sender.substring(0, 10);
		}
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getMessage() {
		if (message != null) {
			message = message.replace("document", "");
			message = message.replace("window", "");
			message = message.replace("var", "");
			message = message.replace("function", "");
			message = message.replace("<video", "");
			message = message.replace("<object", "");
		}
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
